<?php
  @header("content-Type: text/html; charset=utf-8"); //语言强制
	require_once('header.php');
?>

<link rel="stylesheet" href="/css/list.css" type="text/css"/>
<link rel="stylesheet" href="/css/common.css" type="text/css"/>

<div class="gblb">
  <div class="hang1">
    <img src="/images/listPrefix.gif">
    深圳创业板股票列表
  </div>

<div class="hang2"><ul>  
<?php
  @header("content-Type: text/html; charset=utf-8"); //语言强制
  // Connect to the database 
  $dbc = mysqli_connect('localhost', 'root', 'k00l@1D;', 'gudahu')
    or die('Error connecting to MySQL server.');
	mysqli_set_charset($dbc, 'utf8');
  // Retrieve the score data from MySQL
  $query = "SELECT * FROM stock where code like '300%'";
  $result = mysqli_query($dbc, $query)
    or die('Error querying database.');
  $seq = 0;  
  while ($row = mysqli_fetch_array($result)) { 
      echo '<li><a target="_blank" href="http://www.gudahu.com/topHolderDetail.php?code='.$row['code'].'">'.$row['name'].'('.$row['code'].')</a></li>';
      $seq ++;
      if ($seq % 5 == 0) {
         echo '</ul></div><div class="hang2"><ul>'; 
      }
  }				    
  mysqli_close($dbc);
?>
</ul></div>
   
</div>

<?php
	require_once('footer.php');
?>  